package com.yeswater.multithread.chapter1.test1_11.test8;

import org.junit.Test;

/**
 * author : yeswater
 * date : 2023/10/19
 */

public class RunTest {

    @Test
    public void test1() throws InterruptedException {
        MyService service = new MyService();
        ThreadA threadA = new ThreadA(service);
        ThreadB threadB = new ThreadB(service);
        threadA.start();
        Thread.sleep(500);
        threadB.start();
        System.out.println("begin " + System.currentTimeMillis());
        Thread.sleep(5000);
        threadA.stop();
    }

}
